package source.s04.ConditionTestMoreMethod.src.test;

import source.s04.ConditionTestMoreMethod.src.service.MyService;
import source.s04.ConditionTestMoreMethod.src.extthread.ThreadA;
import source.s04.ConditionTestMoreMethod.src.extthread.ThreadAA;
import source.s04.ConditionTestMoreMethod.src.extthread.ThreadB;
import source.s04.ConditionTestMoreMethod.src.extthread.ThreadBB;

public class Run {

	public static void main(String[] args) throws InterruptedException {
		
		//MyService 2个方法同1个锁
		MyService service = new MyService();
		

		ThreadA a = new ThreadA(service);
		a.setName("A");
		a.start();
		ThreadAA aa = new ThreadAA(service);
		aa.setName("AA");
		aa.start();

		Thread.sleep(100);

		ThreadB b = new ThreadB(service);
		b.setName("B");
		b.start();
		
		ThreadBB bb = new ThreadBB(service);
		bb.setName("BB");
		bb.start();

	}

}
